/**
 * define a Feature-id
 * shoudl be a 0-ended string
 *
 */
#ifndef CORE_FID_H
#define CORE_FID_H
#include <stdio.h>
#include "core/formats.h"
#include "core/chromosomes.h"
#include "core/organisms.h"
#ifdef  __cplusplus
extern "C" {
#endif


/**
 * max length of a fid
 */
#define FID_MAX_LENGTH 16

typedef char fid_t[FID_MAX_LENGTH];
typedef fid_t FidPtr;

/**
 * FeatureIdGetChromosome
 * Return the Chromosome for this fid.
 * @param fid the fid
 * @param position a pointer to the position. May be NULL
 * @return the chromosome with id=ChrUndefined if not found
 */
extern const ChromNamePtr FidGetChromosome(const FidPtr fid,long *position);

/**
 * FidGetOrganism
 * Return the Organism for this fid.
 * @param fid the fid
 * @return the OrganismPtr with id=UndefinedOrganism if not found
 */
extern const OrganismPtr FidGetOrganism(const FidPtr fid);

extern int FidPrintXML(FILE* out,const FidPtr fid);
extern int FidPrintText(FILE* out,const FidPtr fid);
extern int FidPrintJSON(FILE* out,const FidPtr fid);
extern int FidPrintFormatted(FILE* out,const FidPtr ptr,enum Format fmt);

#ifdef  __cplusplus
	}
#endif

#endif

